package Work;

import java.io.Serializable;

import moodish.comm.ClientSideMessage;

/***
 * 
 * @author Paulo Coelho
 * 
 *         This ClientMessage class saves all the informations of the client's
 *         message.
 * 
 */
public class ClientMessage implements ClientSideMessage, Serializable {
	Type type;
	String nick, payLoad;

	/***
	 * 
	 * This is the ClientMessage constructor. Take the following as params:
	 * 
	 * @type
	 * @nick
	 * @payload
	 * 
	 */
	public ClientMessage(Type type, String nick, String payLoad) {
		this.type = type;
		this.nick = nick;
		this.payLoad = payLoad;
	}

	/***
	 * @return payload
	 */
	@Override
	public String getPayload() {
		return payLoad;
	}

	/***
	 * @return type
	 */
	@Override
	public Type getType() {
		return type;
	}

	/***
	 * @return nick
	 */
	@Override
	public String getSendersNickname() {
		return nick;
	}

}
